{% extends "navigationbar.html" %}
{% load static %}


{% block title %}心理健康测评 - 专业心理测试平台{% endblock %}

{% block css %}
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0">
    <meta name="description" content="专业心理健康测评 - 国际标准抑郁与焦虑自评量表">
    <meta name="keywords" content="心理健康测试,抑郁自评量表,焦虑测试,SCL-90,SDS">
    <style>
        :root {
            --primary-color: #FF80AB;
            --secondary-color: #FF4081;
            --success-color: #FFC0CB;
            --text-dark: #3E2723;
            --text-light: #795548;
            --bg-gradient: linear-gradient(135deg, #FFE4E1 0%, #FFCCE5 100%);
        }

        body {
            background: var(--bg-gradient);
            font-family: 'Segoe UI', 'PingFang SC', system-ui;
            line-height: 1.6;
            color: var(--text-dark);
            position: relative;
            /* 为伪元素定位提供参考 */
        }

        body::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image: url('https://images.unsplash.com/photo-1534097193258-743695431889?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2070&q=80');
            /* 可以替换为你自己喜欢的背景图片链接 */
            background-size: cover;
            background-position: center;
            opacity: 0.3;
            /* 设置背景图片的透明度，使其不影响主体内容 */
            filter: blur(3px);
            /* 添加模糊效果，让背景更柔和 */
            z-index: -1;
            /* 将背景置于最底层 */
        }

        /* 导航栏开始 */
        .header {
            background: #fff;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.8rem 9%;
            box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1);
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 1000;
            transition: background-color 0.3s ease;
        }

        .header.scrolled {
            background-color: rgba(255, 255, 255, 0.9);
        }

        .header .logo {
            font-size: 2rem;
            color: #130f40;
            font-weight: bolder;
        }

        .header .logo i {
            color: rgb(230, 154, 142);
        }

        .header .navbar a {
            display: inline-flex;
            align-items: center;
            padding: 0 1rem;
            font-size: 1.8rem;
            font-weight: 500;
            color: #51515b;
        }

        .header .navbar a:hover {
            color: rgb(230, 154, 142);
            transform: scale(1.1);
        }

        .header .icons a {
            font-size: 2.2rem;
            margin-left: 1.5rem;
            color: #130f40;
            cursor: pointer;
        }

        .user-menu {
            position: relative;
            display: inline-block;
        }

        .dropdown-menu {
            display: flex;
            flex-direction: column;
            align-items: center;
            position: absolute;
            top: 206%;
            left: 70%;
            transform: translateX(-50%);
            background-color: #fff;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            border-radius: 0px 0px 15px 15px;
            width: 90px;
            padding: 5px 0;
            visibility: hidden;
            opacity: 0;
            transition: opacity 0.3s ease, visibility 0.3s ease;
        }

        .dropdown-menu a {
            display: block;
            width: 100px;
            padding-top: 0.2rem;
            padding-bottom: 1px;
            padding-right: 1.3rem;
            font-size: 1.5rem !important;
            color: #51515b;
            transition: background 0.3s;
            text-align: center;
        }

        .dropdown-menu a:hover {
            color: rgb(230, 154, 142) !important;
        }

        .user-menu:hover .dropdown-menu {
            visibility: visible;
            opacity: 1;
        }

        .header .icons .login-out-btn {
            background-color: rgb(230, 154, 142);
            color: #fff;
            border: none;
            padding: 4px 12px;
            padding-top: 8px;
            font-size: 16px;
            font-weight: 500;
            border-radius: 80px;
            margin-left: 1.5rem;
            cursor: pointer;
            transition: background 0.3s ease;
        }

        .header .icons .login-out-btn:hover {
            background-color: rgb(225, 130, 116);
        }

        .header .icons a:hover {
            color: rgb(230, 154, 142);
        }

        #menu-icon {
            font-size: 2.8rem;
            color: #130f40;
            cursor: pointer;
            display: none;
        }

        /* 导航栏结束 */
        /* 主内容区 */
        .w {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 40px;
        }

        /* 标题样式 */
        .page-title {
            text-align: center;
            padding: 120px 0 40px;
            font-size: 2.8rem;
            color: var(--text-dark);
            position: relative;
        }

        .page-title::after {
            content: '';
            display: block;
            width: 80px;
            height: 4px;
            background: var(--primary-color);
            margin: 20px auto;
        }

        /* 测试列表容器 */
        .itemlist {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
            gap: 30px;
            padding: 20px 0;
        }

        /* 测试卡片样式 */
        .list {
            background: white;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            position: relative;
        }

        .list:hover {
            transform: translateY(-5px);
            box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
        }

        /* 图片容器 */
        .listImgBox {
            height: 220px;
            overflow: hidden;
            position: relative;
        }

        .listImgBox img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.4s ease;
        }

        .list:hover .listImgBox img {
            transform: scale(1.05);
        }

        /* 测试信息 */
        .listInfo {
            padding: 25px;
        }

        .listInfoTitle {
            font-size: 1.6rem;
            color: var(--text-dark);
            margin-bottom: 15px;
            font-weight: 600;
        }

        .listInfoDes {
            display: flex;
            justify-content: space-between;
            color: var(--text-light);
            font-size: 1.1rem;
        }

        /* 立即测试按钮 */
        .go-test {
            position: absolute;
            right: 20px;
            top: 20px;
            background: var(--success-color);
            color: white;
            padding: 8px 25px;
            border-radius: 20px;
            font-size: 1.2rem;
            transition: all 0.3s ease;
            z-index: 2;
        }

        .list:hover .go-test {
            background: var(--secondary-color);
            transform: scale(1.05);
        }

        /* 底部文字 */
        .footer-text {
            text-align: center;
            padding: 50px 0 30px;
            color: var(--text-light);
            font-size: 1.5rem;
            line-height: 1.8;
        }

        /* 联系我们按钮 */
        .contact-btn {
            position: fixed;
            right: -40px;
            top: 50%;
            transform: translateY(-50%);
            background: var(--success-color);
            color: white;
            padding: 12px 35px;
            border-radius: 25px 0 0 25px;
            font-size: 1rem;
            transition: all 0.3s ease;
            cursor: pointer;
            box-shadow: -3px 3px 15px rgba(0, 0, 0, 0.1);
        }

        .contact-btn:hover {
            right: 0;
            background: var(--secondary-color);
        }

        /* 响应式设计 */
        @media (max-width: 768px) {
            .page-title {
                font-size: 2rem;
                padding: 40px 0 30px;
            }

            .itemlist {
                grid-template-columns: 1fr;
            }

            .listImgBox {
                height: 180px;
            }

            .listInfoTitle {
                font-size: 1.2rem;
            }

            .contact-btn {
                display: none;
            }
        }

        /* 重置默认链接样式 */
        a {
            text-decoration: none;
            color: inherit;
        }

        /* 卡片链接样式 */
        .list a {
            display: block;
            height: 100%;
        }


        .footer {
            background-color: #df9292;
            padding-top: 4rem;
            padding-bottom: 2rem;
        }

        .footer .contact {
            color: #fff;
            font-size: 2.2rem;
            text-align: center;
        }


        .footer .credit {
            text-align: center;
            color: #fff;
            font-size: 2rem;
            padding: 2rem 1rem;
            margin-top: 2.5rem;
        }

        .footer .credit span {
            font-weight: 1000;
        }

    </style>
{% endblock %}


{% block body %}
    <div class="w">
        <h1 class="page-title">国际标准心理测评量表</h1>
        <div class="itemlist">
            <!-- SCL-90 测试卡 -->
            <div class="list">
                <a href="SCL-90/">
                    <div class="go-test">立即测试</div>
                    <div class="listImgBox">
                        <img src="{% static 'img/2.jpg' %}" alt="SCL-90测试封面图">
                    </div>
                    <div class="listInfo">
                        <div class="listInfoTitle">SCL-90症状自评量表</div>
                        <div class="listInfoDes">
                            <span>10项专业心理分析报告</span>
                            <span>90道题</span>
                        </div>
                    </div>
                </a>
            </div>
            <!-- SDS 测试卡 -->
            <div class="list">
                <a href="SDS/">
                    <div class="go-test">立即测试</div>
                    <div class="listImgBox">
                        <img src="{% static 'img/1.jpg' %}" alt="抑郁自评量表封面图">
                    </div>
                    <div class="listInfo">
                        <div class="listInfoTitle">抑郁自评量表（SDS）</div>
                        <div class="listInfoDes">
                            <span>抑郁倾向专业评估</span>
                            <span>20道题</span>
                        </div>
                    </div>
                </a>
            </div>
            <!-- SAS 测试卡 -->
            <div class="list">
                <a href="SAS/">
                    <div class="go-test">立即测试</div>
                    <div class="listImgBox">
                        <img src="{% static 'img/3.jpg' %}" alt="焦虑自评量表封面图">
                    </div>
                    <div class="listInfo">
                        <div class="listInfoTitle">焦虑自评量表（SAS）</div>
                        <div class="listInfoDes">
                            <span>焦虑倾向专业评估</span>
                            <span>20道题</span>
                        </div>
                    </div>
                </a>
            </div>
            <!-- HCL-32 测试卡 -->
            <div class="list">
                <a href="HCL-32/">
                    <div class="go-test">立即测试</div>
                    <div class="listImgBox">
                        <img src="{% static 'img/4.jpg' %}" alt="轻躁狂症自评表(HCL-32)封面图">
                    </div>
                    <div class="listInfo">
                        <div class="listInfoTitle">轻躁狂症自评表(HCL-32)</div>
                        <div class="listInfoDes">
                            <span>轻躁狂症倾向专业评估</span>
                            <span>32道题</span>
                        </div>
                    </div>
                </a>
            </div>
        </div>
        <div class="footer-text">
            <p>心理健康是指个体在心理、情感和社会适应方面的完好状态。</p>
            <p>通过专业量表评估，我们可以更好地了解自己的心理状态，及时采取适当的应对措施。</p>
            <p style="color: var(--primary-color); margin-top: 15px;">"认识自己是智慧的开始" —— 苏格拉底</p>
        </div>
    </div>
{% endblock %}

{% block script %}
    <script>
        const menuIcon = document.getElementById('menu-icon');
        const navbar = document.querySelector('.header .navbar');
        const header = document.querySelector('.header');

        menuIcon.addEventListener('click', () => {
            navbar.classList.toggle('active');
            menuIcon.classList.toggle('fa-times');
        });

        window.addEventListener('scroll', () => {
            if (window.scrollY > 0) {
                header.classList.add('scrolled');
            } else {
                header.classList.remove('scrolled');
            }
        });
    </script>
{% endblock %}